package chixing.day18.homework.work3_1;

public class EmployeeThread extends Thread{

    private Employee employee;

    public EmployeeThread(){}
    public EmployeeThread(Employee employee) {
        this.employee = employee;
    }

    @Override
    public void run() {
        System.out.println(  "大家好，我是" + employee.getName());
        try {
            sleep((int) (Math.random()*4) * 1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

}
